package screens;

import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;

public abstract class AbstractVendasForm extends Form implements CommandListener {

	protected ChoiceGroup cgMes;
	protected TextField tfAno;
	
	protected Command commandEnviar;
	protected Command commandVoltar;
	
	public AbstractVendasForm(String title) {
		super(title);
		
		this.cgMes = new ChoiceGroup("Mês", ChoiceGroup.POPUP);
		this.cgMes.append("Janeiro", null);
		this.cgMes.append("Fevereiro", null);
		this.cgMes.append("Março", null);
		this.cgMes.append("Abril", null);
		this.cgMes.append("Maio", null);
		this.cgMes.append("Junho", null);
		this.cgMes.append("Julho", null);
		this.cgMes.append("Agosto", null);
		this.cgMes.append("Setembro", null);
		this.cgMes.append("Outubro", null);
		this.cgMes.append("Novembro", null);
		this.cgMes.append("Dezembro", null);
		
		this.tfAno = new TextField("Ano", "2008", 4, TextField.NUMERIC);
		
		this.commandEnviar = new Command("Enviar", Command.OK, 1);
		this.commandVoltar = new Command("Voltar", Command.BACK, 1);
		
		this.append(cgMes);
		this.append(tfAno);
		
		this.addCommand(commandEnviar);
		this.addCommand(commandVoltar);
		
		this.setCommandListener(this);
	}
	
}
